


#include "serial.h"


void Seq1()
{
  uint8_t i=0;
  rgb_t c;

  setTime(200);
   while(!stopSeq)
   {
     if (i++ == 20) i=0;

      c = {5*i,100-(5*i),i};
      vertCircle(c,10);
      vertCircleRev(c,10);
   }
}

void Seq2()
{
  rgb_t c = {80,30,50};
  setTime(200);
  clearStripe();
  while (!stopSeq)
  {
    rand(c, 10, false, false);
  }
}


void Seq3()
{
  int8_t i=0;
  rgb_t c = {100,100,100}; 

  setTime(200);
  clearStripe();

   while(!stopSeq)
   {
     rand(c, 10, false, true);
   }
}

void Seq4()
{
    setTime(200);
    rgb_t c ={100,100,80};
    clearStripe();
    while(!stopSeq)
    {
      glowGlobe(c);
      delay(70);
    }
}

void Seq5()
{
  uint8_t i;
  uint8_t nextCol[20] = {1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4};
  rgb_t c[20] = { \
                  {50,10,0}, \
                  {20,10,120}, \
                  {90,10,0}, \
                  {0,10,80}, \
                  {45,80,0}, \
                  {10,10,70}, \
                  {55,10,55}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60}, \
                  {0,60,60} \
                  };

    setTime(200);
    clearStripe();
    while(!stopSeq)
    {
      for (i=0; i<20; i++)
      {
        nextCol[i] = spiral(c[i],20-i, nextCol[i], false);
      }
      
      strip.show();
      delay(60);
  
    }
}

/* Sequence Routine must have*/
void Sequence()
{
    
  // Set Sequence duration
  setTime(200);
  // turn all LEDs off
  clearStripe();

   // stoppable while loop
   while(!stopSeq)
   {
    
   }
}
